﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NewsPortal.Models.PortalModel>" %>
<%@ OutputCache Duration="9999" VaryByParam="None" %> 
<div class="group">
                    <% foreach (var category in Model.Categories)
                       {                           
                           if (category == Model.CurrentCategory)
                           {
%>
                               <div class="active">
                                    <a href="/Category?id=<% =category.Id%>" class="active"><% =Model.CurrentCategory.Title%></a>
                                </div>
                                <%
                           }
                           else
                           {
%>
                    <div>
                        <a href="/Category?id=<% =category.Id%>">
                            <% =category.Title%></a></div>
                    <%

                           }
                       }%>
</div>